from langchain_openai import ChatOpenAI
from langchain.prompts import ChatPromptTemplate
from langchain.prompts import AIMessagePromptTemplate
from langchain.prompts import HumanMessagePromptTemplate
import os
from langchain import llms

api_key = "c27a61cf-658c-4b54-a4e9-d1a4574e6738"
api_base = "https://ark.cn-beijing.volces.com/api/v3"

llm = ChatOpenAI(
    model_name="deepseek-r1-250528",
    openai_api_key=api_key,
    openai_api_base=api_base,
    temperature = 0
)

prompt = ChatPromptTemplate.from_template('你是一个起名大师，请模仿示例起三个{country}名字，比如男孩经常被叫{boy}，女孩经常被叫{girl}') 
messages = prompt.format_messages(country = '中国特色的',boy ='狗蛋',girl = '翠花')
response2 = llm.invoke(messages)
print(response2.content)